import React from 'react';
import {useLocation} from "react-router-dom";

const FunRouteThree = () => {
    const {userName = "", age = 1} = useLocation().state ?? {};
    console.log("userName", userName)
    console.log("age", age)
    return (
        <div>
            <h1>FunRouteThree</h1>
            <div>userName：{userName}</div>
            <div>age：{age}</div>
        </div>
    );
};

export default FunRouteThree;